home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 July: Mac OS SDK / Dev.CD Jul 00 SDK2.toast / Development Kits / Cross Platform / QuickTime 4.1.2 Windows SDK / CIncludes / Patches.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-04-12  |  4.2 KB  |  158 lines  |  [TEXT/R*ch]

  1. /*
  2.      File:        Patches.h
  3.  
  4.      Contains:    Patch Manager Interfaces.
  5.  
  6.      Version:    Technology:    System 8
  7.                  Release:    QuickTime 4.1
  8.  
  9.      Copyright:    (c) 1994-1999 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17.  
  18. #ifndef __PATCHES__
  19. #define __PATCHES__
  20.  
  21. #ifndef __MACTYPES__
  22.     #include <MacTypes.h>
  23. #endif
  24.  
  25.  
  26.  
  27.  
  28. #if PRAGMA_ONCE
  29. #pragma once
  30. #endif
  31.  
  32. #ifdef __cplusplus
  33. extern "C" {
  34. #endif
  35.  
  36. #if PRAGMA_IMPORT
  37. #pragma import on
  38. #endif
  39.  
  40. #if PRAGMA_STRUCT_ALIGN
  41.     #pragma options align=mac68k
  42. #elif PRAGMA_STRUCT_PACKPUSH
  43.     #pragma pack(push, 2)
  44. #elif PRAGMA_STRUCT_PACK
  45.     #pragma pack(2)
  46. #endif
  47.  
  48. #if CALL_NOT_IN_CARBON
  49. enum {
  50.     kOSTrapType                    = 0,
  51.     kToolboxTrapType            = 1
  52. };
  53.  
  54. typedef SignedByte                         TrapType;
  55. enum {
  56.     OSTrap                        = kOSTrapType,                    /* old name */
  57.     ToolTrap                    = kToolboxTrapType                /* old name */
  58. };
  59.  
  60. /*
  61.     GetTrapAddress and SetTrapAddress are obsolete and should not
  62.     be used. Always use NGetTrapAddress and NSetTrapAddress instead.
  63.     The old routines will not be supported for PowerPC apps.
  64. */
  65. #if TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  66.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  67.                                                                                             #pragma parameter __A0 GetTrapAddress(__D0)
  68.                                                                                             #endif
  69. EXTERN_API( UniversalProcPtr )
  70. GetTrapAddress                    (UInt16                 trapNum)                            ONEWORDINLINE(0xA146);
  71.  
  72.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  73.                                                                                             #pragma parameter SetTrapAddress(__A0, __D0)
  74.                                                                                             #endif
  75. EXTERN_API( void )
  76. SetTrapAddress                    (UniversalProcPtr         trapAddr,
  77.                                  UInt16                 trapNum)                            ONEWORDINLINE(0xA047);
  78.  
  79. #endif  /* TARGET_CPU_68K && !TARGET_RT_MAC_CFM */
  80.  
  81. EXTERN_API( UniversalProcPtr )
  82. NGetTrapAddress                    (UInt16                 trapNum,
  83.                                  TrapType                 tTyp);
  84.  
  85. EXTERN_API( void )
  86. NSetTrapAddress                    (UniversalProcPtr         trapAddr,
  87.                                  UInt16                 trapNum,
  88.                                  TrapType                 tTyp);
  89.  
  90.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  91.                                                                                             #pragma parameter __A0 GetOSTrapAddress(__D0)
  92.                                                                                             #endif
  93. EXTERN_API( UniversalProcPtr )
  94. GetOSTrapAddress                (UInt16                 trapNum)                            ONEWORDINLINE(0xA346);
  95.  
  96.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  97.                                                                                             #pragma parameter SetOSTrapAddress(__A0, __D0)
  98.                                                                                             #endif
  99. EXTERN_API( void )
  100. SetOSTrapAddress                (UniversalProcPtr         trapAddr,
  101.                                  UInt16                 trapNum)                            ONEWORDINLINE(0xA247);
  102.  
  103.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  104.                                                                                             #pragma parameter __A0 GetToolTrapAddress(__D0)
  105.                                                                                             #endif
  106. EXTERN_API( UniversalProcPtr )
  107. GetToolTrapAddress                (UInt16                 trapNum)                            ONEWORDINLINE(0xA746);
  108.  
  109.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  110.                                                                                             #pragma parameter SetToolTrapAddress(__A0, __D0)
  111.                                                                                             #endif
  112. EXTERN_API( void )
  113. SetToolTrapAddress                (UniversalProcPtr         trapAddr,
  114.                                  UInt16                 trapNum)                            ONEWORDINLINE(0xA647);
  115.  
  116.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  117.                                                                                             #pragma parameter __A0 GetToolboxTrapAddress(__D0)
  118.                                                                                             #endif
  119. EXTERN_API( UniversalProcPtr )
  120. GetToolboxTrapAddress            (UInt16                 trapNum)                            ONEWORDINLINE(0xA746);
  121.  
  122.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  123.                                                                                             #pragma parameter SetToolboxTrapAddress(__A0, __D0)
  124.                                                                                             #endif
  125. EXTERN_API( void )
  126. SetToolboxTrapAddress            (UniversalProcPtr         trapAddr,
  127.                                  UInt16                 trapNum)                            ONEWORDINLINE(0xA647);
  128.  
  129. #if TARGET_CPU_PPC
  130. EXTERN_API( UniversalProcHandle )
  131. GetTrapVector                    (UInt16                 trapNumber);
  132.  
  133. #endif  /* TARGET_CPU_PPC */
  134.  
  135. #endif  /* CALL_NOT_IN_CARBON */
  136.  
  137.  
  138. #if PRAGMA_STRUCT_ALIGN
  139.     #pragma options align=reset
  140. #elif PRAGMA_STRUCT_PACKPUSH
  141.     #pragma pack(pop)
  142. #elif PRAGMA_STRUCT_PACK
  143.     #pragma pack()
  144. #endif
  145.  
  146. #ifdef PRAGMA_IMPORT_OFF
  147. #pragma import off
  148. #elif PRAGMA_IMPORT
  149. #pragma import reset
  150. #endif
  151.  
  152. #ifdef __cplusplus
  153. }
  154. #endif
  155.  
  156. #endif /* __PATCHES__ */
  157.  
  158.